 
function showAjaxOpr()
{
		 var size =document.getElementById("listsize").value;
		 var innerHTMLStr = "";
		 var type=document.getElementById("type").value; 
		 for(var i=0;i<size;i++)
		 {
		     if(document.getElementById('checkone'+i).checked)
		     {
			     var check_id = document.getElementById('checkone'+i).value;
			     var check_name = document.getElementById('checkName'+i).value;
                 innerHTMLStr =	"<tr id='"+type+"_spandiv"+i+"'><td width='20%'  align='right' style='background:#F9F9F9;'><font color='#666666'>当前选择:</font>"+"</td><td width='40%' style='background:#F9F9F9;'><font color='#666666'>"+check_name+"</font></td>"+"<td width='40%'>&nbsp;<img src='/program/company/index/images/cross.png' style='vertical-align:middle;cursor:pointer;' title=移除 onclick=moveout('"+i+"','"+type+"') /></td></tr>";
		         document.getElementById(type+"_show_table").innerHTML= "<table width='100%' border='0' cellspacing='0' cellpadding='0' >" + innerHTMLStr + "</table>";
            
             if(type=='py')
             {             
	             document.getElementById("pay_id").value= check_id;	
	             document.getElementById("pay_name").value=	check_name;	
             }
             if(type=='sp')
             {             
	             document.getElementById("shipping_id").value=	check_id;	
	             document.getElementById("shipping_name").value=check_name;	
             }
                 break;		      
			 }             
		 } 
		 TB_remove();
}

function showAjaxShipping(province,all_goods_num,total_price,all_goods_weight)
{
	    var size =document.getElementById("listsize").value;
		var innerHTMLStr = "";
		for(var i=0;i<size;i++)
		{
		     if(document.getElementById('checkone'+i).checked)
		     {
			     var check_id = document.getElementById('checkone'+i).value;
			     var check_name = document.getElementById('checkName'+i).value;
				 var fee=0;
				 var rdata = Math.round(Math.random()* 10000);
				 var udata ='shipping_id='+check_id+'&all_goods_weight='+all_goods_weight+'&total_price='+total_price+'&all_goods_num='+all_goods_num+'&province='+province+'&rdata='+rdata; 
				 jQuery.ajax({
						   type: 'POST',
						   url: '/program/admin/order/ajaxShowShippFee.jsp',
						   data: udata,
						   async:false,									   
						   success: function(msg){
							 fee =  jQuery.trim(msg);	
						   }
				   }); 
                 
				 innerHTMLStr =	"<tr id='sp_spandiv"+i+"'><td width='20%'  align='right' style='background:#F9F9F9;'><font color='#666666'>当前选择:</font>"+"</td><td width='40%' style='background:#F9F9F9;'><font color='#666666'>"+check_name+"</font><font color='FF8000'>(运费:"+fee+")</font></td><td width='40%'>&nbsp;<img src='/program/company/index/images/cross.png' style='vertical-align:middle;cursor:pointer;' title=移除 onclick=moveout('"+i+"','sp') /></td></tr>";
		         document.getElementById("sp_show_table").innerHTML= "<table width='100%' border='0' cellspacing='0' cellpadding='0' >" + innerHTMLStr + "</table>";
                     
	             document.getElementById("shipping_id").value=	check_id;	
	             document.getElementById("shipping_name").value=check_name;	
            
                 break;		      
			 }             
		 } 
		
		TB_remove();

}


function moveout(k,type)
{
        
     if(type=='py')
     {             
         document.getElementById("pay_id").value="";	
         document.getElementById("pay_name").value=	"";	
     }
     if(type=='sp')
     {             
       document.getElementById("shipping_id").value="";	
       document.getElementById("shipping_name").value=	"";	
     }
    
	   document.getElementById(type+"_spandiv"+k).style.display='none';
}
  